import { NgModule, Optional, SkipSelf } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { HeaderComponent } from './layouts/header/header.component';
import { ShareModule } from './share/share.module';
import { BreadcrumbModule } from './share/components/breadcrumb/breadcrumb.module';
import { HttpClientModule } from '@angular/common/http';
import { PagesModule } from './pages/pages.module';





@NgModule({
  declarations: [AppComponent, HeaderComponent],
  imports: [
    BrowserModule,
    AppRoutingModule,
    ShareModule,
    HttpClientModule,
    PagesModule,
    BreadcrumbModule
  ],
  exports:[ShareModule,BreadcrumbModule,BrowserModule,AppRoutingModule]
})
export class CoreModule {
  constructor(@SkipSelf() @Optional() parentModule: CoreModule) {
    if (parentModule) {
      throw new Error('CoreModule只能被AppModule引入')
    }
  }
}
